<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('清单')" />
    <th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="gray-bg">
<div class="row">
    <div class="col-sm-12">
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m-t"  id="form-order-edit">
        <div class="form-group">
            <label class="col-sm-2 control-label">总计：</label>
            <div class="form-control-static" th:text="${totalAmount}">
            </div>
        </div>
        <input id="ids" name="ids" th:value="${ids}" type="hidden">
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-select-js" />
<script th:inline="javascript">
    var prefix = ctx + "system/company";
    $("#form-order-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            // $.operate.save(prefix + "/settlement", $('#form-order-edit').serialize());
            $.modal.close();
        }
    }

    $(function() {
        var options = {
            data: [[${orderTransferList}]],
            pagination: false,
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            sidePagination: "client",
            columns: [
            {
                field: 'id',
                align: 'center',
                title: "序号",
                formatter: function (value, row, index) {
                    var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
                    return columnIndex + $.table.serialNumber(index);
                }
            },
            {
                field: 'name',
                align: 'center',
                title: '中转段',
            },
            {
                field: 'transporter',
                align: 'center',
                title: '驾驶员',
            },
            {
                field: 'transporterPhone',
                align: 'center',
                title: '驾驶员电话',
            },
            {
                field: 'plateNumber',
                align: 'center',
                title: '车牌号',
            },
            {
                field: 'vehicleModel',
                align: 'center',
                title: '车型',
            },
            {
                field: 'origin',
                align: 'center',
                title: '起始地',
            },
            {
                field: 'transitPoint',
                align: 'center',
                title: '中转地',
            },
            {
                field: 'dest',
                align: 'center',
                title: '目的地',
            },
            {
                field: 'amount',
                align: 'center',
                title: '到收费用',
            },
            {
                field: 'transferFee',
                align: 'center',
                title: '中转费',
            },
            {
                field: 'owes',
                align: 'center',
                title: '欠/返',
            }
            ]
        };
        $.table.init(options);
    });

</script>
</body>
</html>